import org.junit.Test;

import java.time.ZonedDateTime;

public class getTime {

    @Test
    public void time(){
        ZonedDateTime zonedDateTime = ZonedDateTime.now();
        System.out.println(zonedDateTime);
//2020-10-23T22:20:31.821+08:00[Asia/Shanghai]
    }
}
